export const replaceHttpsToHttp = function (obj: any) {
  if (typeof obj === 'object' && obj !== null) {
    if (Array.isArray(obj)) {
      obj.forEach((item) => replaceHttpsToHttp(item))
    } else {
      Object.keys(obj).forEach((keys) => {
        if (keys.startsWith('https') && typeof obj[keys] === 'string') {
          // 替换操作
          obj[keys] = obj[keys].replace(/^https:\/\//i, 'http://')
        } else {
          replaceHttpsToHttp(obj[keys])
        }
      })
    }
  }
}
